package com.bootdo.clouddo.service.user;

import cn.binarywang.wx.miniapp.bean.WxMaPhoneNumberInfo;
import cn.binarywang.wx.miniapp.bean.WxMaUserInfo;
import com.bootdo.clouddo.domain.user.QaUsers;

public interface IUserService {
	
	QaUsers findById(Long uid);
	
	QaUsers selectByUserName(String userName);

	QaUsers selectByUserNameOrMobile(String name);
	
	Integer updateUserInfoById(QaUsers qaUsers);

	int updateUserWxInfoById(QaUsers user, WxMaUserInfo wxUserInfo);

	int updateUserMobileoById(QaUsers user, WxMaPhoneNumberInfo phontInfo);

	QaUsers findByMobile(String mobile);

	boolean existsByMobile(String mobile);
	
	int save(QaUsers appUser);

	Integer updatePwdByMobile(QaUsers user);

	Integer modifyPasswordById(QaUsers user);

	int updateAvatar(Long uid, String url);
	
	int fieldIncrease(String field, Integer val, Long uid);
	
	QaUsers selectByWxOpenId(String openId);

	int updateVip(Long uid);

	int updateIntegralExp(Double obtainIntegral, Double obtainExp, Long uid);

	boolean checkVip(QaUsers user);

	Long countTotal();

	Integer findExpRank(Long uid);

	Integer findSignInDaysRank(Long uid);

	Integer findAgreeCountRank(Long uid);

	Double findNewIntegral(Long uid);

	Double findNewExp(Long uid);

	Double getRawExp(Long uid);

}
